package dropbox.common;

import java.io.Serializable;

import client_listen_update_files.ClientFileAction;
/**
 * part of common classes of server and client
 * this abstract class holds the command
 * the server sends to user each command
 * instance perform execute according to 
 * fileAction API (see fileAction javaDoc)
 * 
 * @author Yoav
 *
 */
public abstract class Command implements Serializable{
	
	//holds file action instance
	private transient FileAction action = null;
	
	
	/**
	 * execute command
	 */
	public abstract void execute();
	
	/**
	 * set action
	 * @param action fileAction instance
	 */
	public void setAction(FileAction action){
		this.action=action;
	}
	/**
	 * get FileAction instance
	 * @return FileAction instance
	 */
	public FileAction getAction(){
		return action;
	}
}
